import java.util.Scanner;

public class Test {
    public static void Binary_Search(int[] array,int x){
        int right = array.length - 1;
        int left = 0;
        int mid = (right+left)/2;
        int result = 0;
        while (left <= right){
            if(array[mid]==x){
                result = 1;
                break;
            } else if (array[mid] > x) {
                right = mid;
                mid = (right+left)/2;
            }
            else {
                left = mid;
                mid = (right+left)/2;
            }
        }
        if(result == 1){
            System.out.println("找到了下标是"+mid);
        }
        else {
            System.out.println("没有该元素");
        }
    }
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int x = sc.nextInt();
        int[] array = {1,2,3,56,67,89,99,100};
        Binary_Search(array,x);
    }
}
